home *** CD-ROM | disk | FTP | other *** search
/ Champak 138 / Volume 138 Aug 19 2011 - Damaged.iso / Games / winter_challenge.swf / scripts / frame_153 / PlaceObject2_260_106 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Text File  |  2011-08-19  |  1KB  |  43 lines

  1. onClipEvent(enterFrame){
  2.    if(this != _root.mineClip && hitFlag != 1 && bossHitFlag != 1)
  3.    {
  4.       detonationCount++;
  5.       if(detonationCount >= detonationTime)
  6.       {
  7.          hitFlag = 1;
  8.          detonationCount = 0;
  9.          this.gotoAndPlay("detonate");
  10.       }
  11.    }
  12.    if(this.hitTest(_root.bossClip))
  13.    {
  14.       if(bossHitFlag != 1)
  15.       {
  16.          bossHitFlag = 1;
  17.          _root.bossClip.hitpoints -= 5;
  18.          _root.CONK.start(0,0);
  19.          this.gotoAndPlay("detonate");
  20.          detonationCount = 0;
  21.       }
  22.    }
  23.    if(this.hitTest(_root.ATVclip) && detonationCount >= 50 && hitFlag != 1 && bossHitFlag != 1)
  24.    {
  25.       hitFlag = 1;
  26.       if(_root.redTire_cheat == 0)
  27.       {
  28.          if(Math.abs(_root.ATVclip.xspeed) > 0.2)
  29.          {
  30.             _root.ATVclip.xspeed -= _root.ATVclip.xspeed / 2;
  31.          }
  32.          if(Math.abs(_root.ATVclip.yspeed) > 0.2)
  33.          {
  34.             _root.ATVclip.yspeed -= _root.ATVclip.yspeed / 2;
  35.          }
  36.          _root.ATVclip.reduceShields(250,25);
  37.       }
  38.       _root.CONK.start(0,0);
  39.       this.gotoAndPlay("detonate");
  40.       detonationCount = 0;
  41.    }
  42. }
  43.